<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:url('Dynamiclabel/index')}">话题标签列表</a></li>
			<li class="active"><a >添加话题标签</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Dynamiclabel/addPost')}">
		
			<fieldset>
				
				<div class="form-group" >
					<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>名称</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-name"  name="name" maxlength="20"><p class="help-block">最多20个字</p>
					</div>
				</div>
				
				<div class="form-group">
					<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>封面</label>
					<div class="col-md-6 col-sm-10">
						<input type="hidden" name="thumb" id="thumbewm" value="">
						<a href="javascript:uploadOneImage('图片上传','#thumbewm');">
							<img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbewm-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
						</a>
						<input type="button" class="btn btn-sm btn-cancel-thumbewm" value="取消图片"> <p class="help-block">建议尺寸：150 X 150 </p>
					</div>
				</div>
				
				<div class="form-group">
					<label for="input-maintain_switch" class="col-sm-2 control-label"><span class="form-required">*</span>推荐</label>
					<div class="col-md-6 col-sm-10">
						<select class="form-control" name="isrecommend">
							<option value="0">否</option>
							<option value="1">是</option>
						</select>
					</div>
				</div>
		 
				
                
			</fieldset>
			
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="{:url('Dynamiclabel/index')}">{:lang('BACK')}</a>
				</div>
			</div>
			
			
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
		(function(){
	
			$('.btn-cancel-thumbewm').click(function () {
				$('#thumbewm-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
				$('#thumbewm').val('');
			});
			
		})()

	</script>
</body>
</html>